home *** CD-ROM | disk | FTP | other *** search
/ Brotikasten / BROTCD01.iso / tools / util470.d64 / ultraformat v2 (.txt) < prev    next >
Commodore BASIC  |  1995-08-06  |  6KB  |  167 lines

  1. 100 REM *****  ULTRAFORMAT V2.0  *****
  2. 110 :   :   :                    :   :
  3. 120 REM *****  UEBERARBEITUNG :  *****
  4. 130 REM *****  FRANK BERKNER     *****
  5. 140 REM *****  AM GRUENEN WEG 14 *****
  6. 150 REM *****  5024 PULHEIM 2    *****
  7. 160 :
  8. 170 POKE53280,.:POKE53281,.:POKE53272,23
  9. 175 OPEN1,8,15,"UI":PRINT#1,"I"
  10. 180 PRINT"[147][158]*****  [213] L T R A F O R M A T  [214]2.0 *****"
  11. 190 G$(1)="[199]ANZE [196]ISKETTE FORMATIEREN[146]"
  12. 200 G$(.)="[206]UR [211]PUR 36-41 FORMATIEREN[146]"
  13. 210 G$(2)="[213]MSCHALTPROGRAMME ERSETZEN[146]"
  14. 220 G=1:PRINTG$(1);G$(.);G$(2)
  15. 230 PRINT"[193]USWAHL MIT [195]URSORTASTEN UND  [210]ETURN[146]"
  16. 240 PRINT""G$(G):WAIT198,1:GETG$
  17. 260 IFG$=CHR$(13)THEN320
  18. 270 IFG$=""THENIFG=1THENPRINTG$(G):G=.:GOTO240
  19. 280 IFG$=""THENIFG=.THENPRINTG$(G):G=2:GOTO240
  20. 290 IFG$="[145]"THENIFG=.THENPRINTG$(G):G=1:GOTO240
  21. 300 IFG$="[145]"THENIFG=2THENPRINTG$(G):G=.:GOTO240
  22. 310 GOTO240
  23. 320 IFG=1THENGOSUB1190
  24. 330 IFG=2THENGOTO1330
  25. 340 PRINT"[196]ISKSWITCHES ABSPEICHERN :[158]"
  26. 345 PRINT"1[146]) [206]ORMAL ALS [208][210][199] (BELEGT 2 [194]LOECKE)"
  27. 350 PRINT"2[146]) [193]UF [212]RACK 18   (BELEGT 0 [194]LOECKE)"
  28. 360 WAIT198,1:GETA$
  29. 370 IFA$="1"THENY=1
  30. 380 IFA$<>"1"ANDA$<>"2"THEN360
  31. 390 REM  ***** VORBEREITUNGEN
  32. 400 OPEN2,8,2,"#1"
  33. 410 PRINT#1,"M-W"CHR$(81)CHR$(.)CHR$(1)CHR$(255)
  34. 420 PRINT#1,"M-W"CHR$(.)CHR$(.)CHR$(1)CHR$(192)
  35. 430 PRINT#1,"M-W"CHR$(8)CHR$(.)CHR$(2)CHR$(36)CHR$(.)
  36. 440 PRINT#1,"M-W"+CHR$(7)+CHR$(28)+CHR$(1)+CHR$(15)
  37. 450 REM  ***** UEBERTRAGUNG
  38. 460 A$="":FORX=.TO32:READA:A$=A$+CHR$(A):NEXT
  39. 470 PRINT#1,"B-P"2;.:PRINT#2,A$;
  40. 480 REM  ***** FORMATIERUNG
  41. 490 PRINT#1,"M-W"CHR$(1)CHR$(.)CHR$(1)CHR$(224)
  42. 500 REM  ***** DATAS EINLESEN
  43. 510 FORQ=.TO72:READA:NO$=NO$+CHR$(A):NEXT
  44. 520 FORQ=.TO195:READA:D$(2)=D$(2)+CHR$(A):NEXT
  45. 530 FORQ=.TO195:READA:D$(3)=D$(3)+CHR$(A):NEXT
  46. 540 REM  ***** WARTEN AUF FORMATENDE
  47. 550 PRINT#1,"M-R"CHR$(1)CHR$(.)CHR$(1):GET#1,A$:IFASC(A$+CHR$(.))>127THEN550
  48. 560 REM  ***** DIREKTORY-GENERATOR
  49. 570 GOSUB1100:PRINT#1,"U1"2;.;18;.
  50. 580 GOSUB1140:PRINT#1,"B-P"2;4
  51. 590 A$="":FORX=4TO71:A$=A$+CHR$(.):NEXT
  52. 600 A$=A$+CHR$(17)+CHR$(252)+CHR$(255)+CHR$(7)
  53. 610 FORX=76TO95STEP4:A$=A$+CHR$(19)+CHR$(255)+CHR$(255)+CHR$(7):NEXT
  54. 620 FORX=96TO143:A$=A$+CHR$(.):NEXT:PRINT#2,A$;
  55. 630 PRINT#1,"B-P"2;162:PRINT#2,"OBEN ";
  56. 640 PRINT#1,"U2"2;.;18;.
  57. 650 REM  ***** NOTHILFE-GENERATOR
  58. 660 PRINT#1,"B-P"2;.
  59. 670 A$=CHR$(.)+CHR$(255)+CHR$(130)+CHR$(18)+CHR$(2)+"NICHT VALIDIEREN"
  60. 680 FORX=22TO255:A$=A$+CHR$(.):NEXT
  61. 690 PRINT#2,A$;:PRINT#1,"U2"2;.;18;1
  62. 700 PRINT#1,"B-P"2;.
  63. 710 A$=CHR$(.)+CHR$(79)+CHR$(.)+CHR$(4)+NO$
  64. 720 PRINT#2,A$;:PRINT#1,"U2"2;.;18;2
  65. 730 GOSUB1100
  66. 740 REM  ***** DISKSWITCHES SCHREIBEN
  67. 750 IFYTHEN1230: REM NORMAL ?
  68. 760 REM  ***** 0 BLOCK
  69. 770 PRINT#1,"U1"2;.;18;.:PRINT#1,"B-P"2;73:V=1:S=.
  70. 780 GET#2,X$:X=ASC(X$+CHR$(.))
  71. 790 FORJ=.TO7:X=X/2:IFX<>INT(X)THENG(V)=S:V=V+1
  72. 800 IFV=4THEN840
  73. 810 S=S+1:X=INT(X):NEXT
  74. 820 IFS>18THENCLOSE2:GOTO1240
  75. 830 GOTO780
  76. 840 FORZ=1TO2:IFZ=1THENN$=" C000":K=.:L=192:V=2
  77. 850 IF Z=2THENN$=" 033C":K=60:L=3:V=3
  78. 860 T=18:S=1
  79. 870 PRINT#1,"U1"2;.;T;S:PRINT#1,"B-P"2;.
  80. 880 GET#2,T1$,S1$:T1=ASC(T1$+CHR$(.)):S1=ASC(S1$+CHR$(.))
  81. 890 IFT1THENT=T1:S=S1:GOTO870
  82. 900 FORQ=.TO7:PRINT#1,"B-P"2;Q*32+2
  83. 910 GET#2,X$:IFASC(X$+CHR$(.))=0THEN 930
  84. 920 NEXT
  85. 930 PRINT#1,"B-P";2;Q*32+2
  86. 940 A$=CHR$(130)+CHR$(18)+CHR$(G(V))+"DISKSWITCH"+N$+CHR$(160):PRINT#2,A$;
  87. 950 PRINT#1,"B-P"2;Q*32+30:PRINT#2,CHR$(.);CHR$(.)
  88. 955 PRINT#1,"B-P"2;.:PRINT#2,CHR$(.)
  89. 960 PRINT#1,"U2 2 0";T;S
  90. 970 REM  ***** DATAS SCHREIBEN
  91. 980 PRINT#1,"B-P 2";.
  92. 990 A$=CHR$(.)+CHR$(199)+CHR$(K)+CHR$(L)
  93. 1000 FORQ=.TO.:A$=A$+D$(V):NEXT
  94. 1010 PRINT#2,A$;:PRINT#1,"U2"2;.;18;G(V)
  95. 1020 PRINT#1,"B-A";.;18;G(V)
  96. 1030 NEXT
  97. 1040 REM  ***** ENDE
  98. 1050 INPUT#1,A,B$,C,D:PRINTA;B$;C;D
  99. 1060 CLOSE2:CLOSE1:END
  100. 1070 :
  101. 1080 REM  ***** UNTERPROGRAMME
  102. 1090 REM  ***** SPURSCHALTPROGRAMME
  103. 1100 PRINT#1,"M-W"CHR$(6)CHR$(.)CHR$(2)CHR$(1)CHR$(.)
  104. 1110 PRINT#1,"M-W"CHR$(.)CHR$(.)CHR$(1)CHR$(128)
  105. 1120 PRINT#1,"M-R"CHR$(.)CHR$(.)CHR$(1):GET#1,A$:IFASC(A$+CHR$(.))>127THEN1120
  106. 1130 RETURN
  107. 1140 PRINT#1,"M-W"CHR$(6)CHR$(.)CHR$(2)CHR$(36)CHR$(.)
  108. 1150 PRINT#1,"M-W"CHR$(.)CHR$(.)CHR$(1)CHR$(176)
  109. 1160 PRINT#1,"M-R"CHR$(.)CHR$(.)CHR$(1):GET#1,A$:IFASC(A$+CHR$(.))>127THEN1160
  110. 1170 RETURN
  111. 1180 REM  ***** NORMAL FORMATIEREN
  112. 1190 INPUT"DISK-NAME";N$:N$=LEFT$(N$,12)
  113. 1200 INPUT"DISK-ID  ";ID$:ID$=LEFT$(ID$,2)
  114. 1210 PRINT#1,"N:"+N$+","+ID$:PRINT#1,"I"
  115. 1215 INPUT#1,A,B$,C,D:IFATHENPRINTA;B$;C;D:CLOSE1:END
  116. 1220 RETURN
  117. 1230 REM  ***** DISKSWITCHES NORMAL
  118. 1240 K=49152:N$=" C000":V=2:GOSUB1270
  119. 1250 K=828:N$=" 033C":V=3:GOSUB1270
  120. 1260 GOTO1050
  121. 1270 OPEN3,8,2,"DISKSWITCH"+N$+",P,W"
  122. 1280 INPUT#1,A,B$,C,D:IFATHENPRINTA;B$;C;D:CLOSE3:GOTO1060
  123. 1290 PRINT#3,CHR$(INT(K-INT((K/256))*256))CHR$(INT(K/256));
  124. 1300 PRINT#3,D$(V);:CLOSE3
  125. 1310 RETURN
  126. 1320 REM  ***** DISKSWITCHES ERSETZEN
  127. 1330 PRINT"   [196]ISKETTE EINLEGEN !":WAIT198,1:GETA$
  128. 1340 PRINT#1,"S:DISKSWITCH*"
  129. 1350 OPEN2,8,2,"#":FORQ=.TO105:READA:NEXT
  130. 1360 FORQ=.TO195:READA:D$(2)=D$(2)+CHR$(A):NEXT
  131. 1370 FORQ=.TO195:READA:D$(3)=D$(3)+CHR$(A):NEXT:GOTO770
  132. 1372 :
  133. 1375 REM  ***** DATAS *****
  134. 1380 :
  135. 1390 REM  FORMAT-DATAS
  136. 1400 DATA165,81,201,255,240,24,165,81,201,1,208,6,169,18,133,81,133,34
  137. 1410 DATA165,81,201,25,208,6,169,36,133,81,133,34,76,199,250
  138. 1420 REM  NOTHILFE DATAS
  139. 1430 DATA169,7,133,183,169,1,133,184,169,15,133,185,169,8,133,186,169,65,133
  140. 1435 DATA187,169,4,133,188,32,192,255,169,1,32,195,255,169,1,133,183,169,8
  141. 1440 DATA133,184,169,15,133,185,169,8,133,186,169,72,133,187,169,4,133,188,32
  142. 1445 DATA192,255,169,255,32,195,255,96,77,45,87,0,0,1,192,73
  143. 1450 REM  VON 49152 - 49347
  144. 1460 DATA169,11,141,24,3,169,192,141,25,3,96,120,169,161,141,24,3
  145. 1470 DATA169,2,133,183,169,20,133,184,169,15,133,185,169,8,133,186,169
  146. 1480 DATA193,133,187,169,192,133,188,32,192,255,169,20,32,195,255,173,162
  147. 1490 DATA192,240,11,32,109,192,169,0,141,162,192,76,142,192,32,76,192
  148. 1500 DATA169,1,141,162,192,76,142,192,169,9,133,183,169,163,133,187,32
  149. 1510 DATA192,255,169,20,32,195,255,169,8,133,183,169,171,133,187,32,192
  150. 1520 DATA255,169,20,32,195,255,96,169,9,133,183,169,178,133,187,32,192
  151. 1530 DATA255,169,20,32,195,255,169,8,133,183,169,186,133,187,32,192,255
  152. 1540 DATA169,20,32,195,255,96,169,2,133,183,169,193,133,187,32,192,255
  153. 1550 DATA169,20,32,195,255,32,0,192,64,1,77,45,87,6,0,2,36
  154. 1560 DATA0,77,45,87,0,0,1,176,77,45,87,6,0,2,1,0,77,45,87,0,0,1,128,73,68,78
  155. 1570 REM  VON 828 - 1023
  156. 1580 DATA169,71,141,24,3,169,3,141,25,3,96,120,169,221,141,24,3
  157. 1590 DATA169,2,133,183,169,20,133,184,169,15,133,185,169,8,133,186,169
  158. 1600 DATA253,133,187,169,3,133,188,32,192,255,169,20,32,195,255,173,222
  159. 1610 DATA3,240,11,32,169,3,169,0,141,222,3,76,202,3,32,136,3
  160. 1620 DATA169,1,141,222,3,76,202,3,169,9,133,183,169,223,133,187,32
  161. 1630 DATA192,255,169,20,32,195,255,169,8,133,183,169,231,133,187,32,192
  162. 1640 DATA255,169,20,32,195,255,96,169,9,133,183,169,238,133,187,32,192
  163. 1650 DATA255,169,20,32,195,255,169,8,133,183,169,246,133,187,32,192,255
  164. 1660 DATA169,20,32,195,255,96,169,2,133,183,169,253,133,187,32,192,255
  165. 1670 DATA169,20,32,195,255,32,60,3,64,1,77,45,87,6,0,2,36
  166. 1680 DATA0,77,45,87,0,0,1,176,77,45,87,6,0,2,1,0,77,45,87,0,0,1,128,73,68,0
  167.